package com.hyt.it.ogt.kq.service.gov.feign.ks;

import com.hyt.common.apiInfor.ApiResponse;
import com.hyt.it.ogt.kq.service.gov.feign.ks.model.*;
import com.hyt.loginfo.config.OAuth2FeignRequestConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 考试客户端熔断器
 *
 * @author chengxh
 * @since 2021-11-23
 */
@FeignClient(name = "it-ogt-kz", fallback = KsClientHystrix.class, configuration = OAuth2FeignRequestConfig.class)
public interface KsClient {

    /**
     * 推送批次数据
     *
     * @param pushTimeParam
     * @return 返回推送结果
     */
    @PostMapping("/api/gov/pushTime")
    public ApiResponse<Object> pushTime(PushTimeTaskParam pushTimeParam);

    /**
     * 推送考生须知数据
     *
     * @param pushCandidateNoticeParam
     * @return 返回推送结果
     */
    @PostMapping("/api/gov/pushCandidateNotice")
    public ApiResponse<Object> pushCandidateNotice(PushCandidateNoticeParam pushCandidateNoticeParam);

    /**
     * 推送欢迎语数据
     *
     * @param pushHelloParam
     * @return 返回推送结果
     */
    @PostMapping("/api/gov/pushHelloParam")
    public ApiResponse<Object> pushHello(PushHelloParam pushHelloParam);

    /**
     * 推送考试配置数据
     *
     * @param pushExamConfigVO
     * @return 返回推送结果
     */
    @PostMapping("/api/gov/pushExamConfigVO")
    public ApiResponse<Object> pushExamConfig(PushExamConfigVO pushExamConfigVO);

    /**
     * 推送编排数据
     * @param pushTimeRoomCandidateParam
     * @return 返回推送结果
     */
/*
    @PostMapping("/api/gov/pushTimeRoomCandidate")
    public ApiResponse<Object> pushTimeRoomCandidate(PushTimeRoomCandidateParam pushTimeRoomCandidateParam);
*/

    /**
     * 推送单个考生数据到考试
     *
     * @param param
     * @return
     */
    @PostMapping("/api/gov/pushCandidate")
    ApiResponse<Object> pushCandidate(PushTimeRoomCandidateParam param);

    /**
     * 更新考生信息至考试端
     *
     * @param param
     * @return
     */
    @PostMapping("/api/gov/updateCandidate")
    ApiResponse<?> updateCandidate(PushTimeRoomCandidateVO param);


    /**
     * 通过考试id获取考试地址
     *
     * @param examId 考试id
     * @return 考试地址
     */
    @RequestMapping(value = "/api/gov/getExamUrl", method = RequestMethod.GET)
    ApiResponse<?> getExamUrl(@RequestParam String examId);

    /**
     * 删除考试任务
     *
     * @param taskId
     * @return
     */
    @GetMapping("/api/gov/deleteTask")
    ApiResponse<Boolean> deleteTask(@RequestParam String taskId);

    /**
     * 推送批次数据
     *
     * @param pushTimeParam
     * @return 返回推送结果
     */
    @PostMapping("/api/gov/pushTimeSubject")
    ApiResponse<Object> pushTimeSubject(PushTimeSubjectParam pushTimeParam);
}
